package tienmanh.gs.goldminer.sprite;

import org.andengine.entity.Entity;
import org.andengine.entity.particle.BatchedPseudoSpriteParticleSystem;
import org.andengine.entity.particle.emitter.CircleOutlineParticleEmitter;
import org.andengine.entity.particle.modifier.ColorParticleModifier;
import org.andengine.entity.particle.modifier.ScaleParticleModifier;
import org.andengine.opengl.texture.region.ITiledTextureRegion;
import org.andengine.opengl.vbo.VertexBufferObjectManager;

import android.location.Address;

import tienmanh.gs.goldminer.manager.ResourcesManager;

public class Jewel extends Object{

	public Jewel(float pX, float pY, float pWidth, float pHeight,
			ITiledTextureRegion pTiledTextureRegion,
			VertexBufferObjectManager pVertexBufferObjectManager, int paramInt,
			float paramFloat5, String paramString , int value) {
		super(pX, pY, pWidth, pHeight, pTiledTextureRegion, pVertexBufferObjectManager,
				paramInt, paramFloat5, paramString);
		// TODO Auto-generated constructor stub
		setCurrentTileIndex(value);
		final CircleOutlineParticleEmitter particleEmitter = new CircleOutlineParticleEmitter(-pWidth/2, -pHeight/2, 0);
		final BatchedPseudoSpriteParticleSystem particleSystem = new BatchedPseudoSpriteParticleSystem(particleEmitter, 1, 1, 1, ResourcesManager.getInstance().mSnowParticleRegion, this.getVertexBufferObjectManager());
//		particleSystem.setScale(2.0f);
		particleSystem.addParticleModifier(new ScaleParticleModifier<Entity>(0, 5, 1.0f, 2.0f));
		particleSystem.addParticleModifier(new ColorParticleModifier<Entity>(0, 3, 0, 1, 0, 1.5f, 0f, 2));
		particleSystem.addParticleModifier(new ColorParticleModifier<Entity>(4, 6, 1, 1, 0.5f, 1, 0, 1));
//		particleSystem.addParticleModifier(new AlphaParticleModifier<Entity>(0, 1, 0, 1));
//		particleSystem.addParticleModifier(new AlphaParticleModifier<Entity>(5, 6, 1, 0));
		
//		attachChild(particleSystem);
		
	}

}
